import request from '@/utils/request'

// 查询评分列表
export function listRate(query) {
  return request({
    url: '/movie/rate/list',
    method: 'get',
    params: query
  })
}

// 查询影视评分统计
export function getMovieRate(movieId) {
  return request({
    url: '/movie/rate/movie/' + movieId,
    method: 'get'
  })
}

// 新增评分
export function addRate(data) {
  return request({
    url: '/movie/rate',
    method: 'post',
    data: data
  })
}

// 修改评分
export function updateRate(data) {
  return request({
    url: '/movie/rate',
    method: 'put',
    data: data
  })
}

// 删除评分
export function delRate(rateId) {
  return request({
    url: '/movie/rate/' + rateId,
    method: 'delete'
  })
}

// 导出评分
export function exportRate(query) {
  return request({
    url: '/movie/rate/export',
    method: 'get',
    params: query
  })
}